#include "qtreeindexeditordialog.h"

#include "qlisteditor.h"

#include "../../qbaseitemdelegate.h"
#include "../../styledbar.h"

#include <QVBoxLayout>
#include <QPushButton>
#include <QSpacerItem>
#include <QHBoxLayout>

QTreeIndexEditorDialog::QTreeIndexEditorDialog(QWidget *parent) :
    QBaseDialog(parent),
    m_tab_widget(new QTabWidget),
    m_list_editor(new QListEditor)
{
    QVBoxLayout *v=new QVBoxLayout;

    v->addWidget(m_tab_widget);

    m_tab_widget->addTab(m_list_editor,tr("Column"));

    QHBoxLayout *h=new QHBoxLayout;

    QSpacerItem *spacer=new QSpacerItem(20,20,QSizePolicy::Expanding);
    h->addItem(spacer);

    QPushButton *button;

    button=new QPushButton(tr("Ok"));
    h->addWidget(button);
    button->setFocus();

    button=new QPushButton(tr("Cancel"));
    h->addWidget(button);

    v->addLayout(h);

    setLayout(v);

    m_tab_widget->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);

    setWindowTitle(tr("Edit Tree Data"));
}
